<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 事件三要素：事件源、事件类型、事件处理程序 -->
    <button id="btn">我需要治疗！！！</button>
    <div>啊啊啊啊啊！！！</div>
    <script>
        var btn = document.getElementById('btn');
        btn.onclick = function(){
            alert('滚');
        }
        var div = document.querySelector('div');
        div.onclick = function(){
            console.log('fuck');
        }
    </script>
</body>
</html>